﻿using Liguo.AppCode;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Liguo.Store
{
    public partial class Top : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Write("<div class=\"top\">");
            Response.Write("<div class=\"top_box\">");
            Response.Write("<ul>");
            Boolean isLogin = (Session["User"] != null);
            if (isLogin)
            {
                Response.Write("<li><a href=\"My.aspx\" target=\"_top\">你好，"+((User)Session["User"]).UserName+"</a></li>");
                Response.Write("<li><a href=\"MyOrder.aspx\" target=\"_top\">我的订单</a></li>");
                Response.Write("<li><a href=\"Port.aspx?mod=Login\" target=\"_top\">退出</a></li>");
            }
            else
            {
                Response.Write("<li><a href=\"Port.aspx?mod=Login\" target=\"_top\">请登录</a></li>");
                Response.Write("<li><a href=\"Port.aspx?mod=Register\" target=\"_top\">注册</a></li>");
            }
            Response.Write("</ul>");
            Response.Write("</div>");
            Response.Write("</div>");
        }
    }
}